package xyz.wadewhy.basicstest.easyExcel.test;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ContentFontStyle;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import lombok.*;
import com.alibaba.excel.enums.poi.FillPatternTypeEnum;

import java.util.Date;

/**
 * @ClassName DemoData
 * @Description 业务用途
 * @Author zhongzihao
 * @Date 2022/3/10 4:33 下午
 * @Version 1.0
 **/
@Getter
@Setter
@EqualsAndHashCode
// 头背景设置成红色 IndexedColors.RED.getIndex()
//@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
// 头字体设置成20
//@HeadFontStyle(fontHeightInPoints = 10)
// 内容的背景设置成绿色 IndexedColors.GREEN.getIndex()
//@ContentStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 17)
// 内容字体设置成20
//@ContentFontStyle(fontHeightInPoints = 10)
public class DemoData {
    // 字符串的头背景设置成粉红 IndexedColors.PINK.getIndex()
//    @HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 14)
    // 字符串的头字体设置成20
//    @HeadFontStyle(fontHeightInPoints = 10)
    // 字符串的内容的背景设置成天蓝 IndexedColors.SKY_BLUE.getIndex()
//    @ContentStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 40)
    // 字符串的内容字体设置成20
//    @ContentFontStyle(fontHeightInPoints = 10)
    @ExcelProperty("字符串标题")
    public String string;
    @ExcelProperty("日期标题")
    public Date date;
    @ExcelProperty("数字标题")
    public Double doubleData;

    public DemoData(String string, Date date, Double doubleData) {
        this.string = string;
        this.date = date;
        this.doubleData = doubleData;
    }

    public DemoData() {
    }

    @Override
    public String toString() {
        return "DemoData{" +
                "string='" + string + '\'' +
                ", date=" + date +
                ", doubleData=" + doubleData +
                '}';
    }
}
